package com.ceair.flight.refund.location.dt.enums;
/**
 * 机票订单订单状态枚举
 * @author rujun
 *
 */
public enum FlightOrderStatusEnum {

	WAIT_PAY(1,"等待支付"),
	WAIT_TICKETED(2,"等待开票"),
	TICKETED(3,"已开票"),
	TICKET_ERROR(4,"开票失败"),
	CANCLED(5,"已取消"),
	ERROR(6,"异常"),
	WAIT_ASYNC_CALLBACK(8,"支付中");
	/** 简码 */
    private final Integer code;

    /** 描述 */
    private final String description;
    
    private FlightOrderStatusEnum(Integer code, String description){
    	this.code = code;
        this.description = description;
    }
    
    /**
     * @return Returns the code.
     */
    public Integer getCode() {
        return code;
    }

    /**
     * @return Returns the description.
     */
    public String getDescription() {
        return description;
    }

    /**
     * 通过枚举<code>code</code>获得枚举。
     *
     * @param code  简码
     * @return      枚举
     */
    public static com.ceair.flight.refund.location.dt.enums.FlightOrderStatusEnum getByCode(Integer code) {
        for (com.ceair.flight.refund.location.dt.enums.FlightOrderStatusEnum status : values()) {
            if (status.getCode()==code) {
                return status;
            }
        }
        return null;
    }
}
